<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div {
            width: 100px;
            height: 100px;
            background-color: red;
        }
        .div-big {
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .active {
            color: red;
        }
        .no-active {
            color: blue;
            font-size: 60px;
        }
        .div3 {
            width: 100px;
            height: 100px;
            border: 1px solid red;
        }
        .young {
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div id="app">
        <p v-bind:title="msg" :qwer="df">v-bind指令：绑定标签属性，使得属性值变成变量</p>
        <!-- 变量替换和字符串拼接 -->
        <div :class="class1+'-big'"></div>
        <!-- 满足条件时才有class -->
        <div :class="{active: isShow}">11111111</div>
        <!-- ture或者false都有对应的class -->
        <div :class="isShow?'active':'no-active'">66666</div>
        <!-- 啥都有 -->
        <div :class="['div3', {active: isShow}, hasWude?'ma':'young']"></div>
    </div>
    <script src="../vue.js"></script>
    <script>
        let vm = new Vue({
            el: '#app',
            data: {
                msg: '66666666',
                df: 'LOLm',
                class1: 'div',
                isShow: true,
                hasWude: false
            }
        })
    </script>
</body>
</html>